package com.nuoyuan.wx;

import com.nuoyuan.wx.common.utils.HashUtil;
import com.nuoyuan.wx.common.utils.HttpClientUtils;

/**
 * @Package com.nuoyuan.wx
 * @ClassName DxPayAliTest
 * @Description TODO
 * @Author linus
 * @Date 2020-03-02 14:06
 * @Version 1.0
 **/
public class DxPayAliTest {

    public static void main(String[] args) {
        String parter = "10734";
        String type = "1004";
        String callbackurl = "http://www.test.com/Pay_DxPay_notifyurl.html";
        String value = "300";
        String orderid = "test0002";
        String key = "431843b5582844788466a1de57a0a38e";

        String source = "parter=" + parter + "&type=" + type + "&value=" + value + "&orderid=" + orderid + "&callbackurl=" + callbackurl;
        String sign = HashUtil.getStringMD5(source + key);

        String url = "http://pay.ydjxpay.com/Recharge/?" + source + "&sign=" + sign;

        String result = HttpClientUtils.executeGet(url);
        System.out.println(result);

    }
}
